package pingpongdojo.model;

import java.util.UUID;

public class User {
	private UUID id;
	private String username;
	private String password;
	private String name;

	public User() {
	}

	public User(UUID id, String username, String password, String name) {
		this.id = id;
		this.username = username;
		this.password = password;
		this.name = name;
	}

	public UUID getId() {
		return id;
	}

	public void setId(UUID id) {
		this.id = id;
	}

	public String getUserName() {
		return username;
	}

	public String getPassword() {
		return password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int hashCode() {
		return id.hashCode();
	}

	@Override
	public boolean equals(Object otherObject) {
		if (!(otherObject instanceof User)) {
			return false;
		}

		User otherUser = (User) otherObject;
		return id.equals(otherUser.getId());
	}
}
